package book;

public class PairOfUserIdAndBookId {

    private int userId;
    private int ISBN;

    public PairOfUserIdAndBookId() {
    }

    public PairOfUserIdAndBookId(int userId, int ISBN) {
        this.userId = userId;
        this.ISBN = ISBN;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public int getISBN() {
        return ISBN;
    }

    public void setISBN(int bookId) {
        this.ISBN = ISBN;
    }

    //把对象转化为JSON字符串的形式
    public String toJson() {
        StringBuilder json = new StringBuilder();
        json.append(userId).append(",");
        json.append(ISBN);

        return json.toString();

    }


}
